package com.cqjtu.eecs.entity.dto;

import com.cqjtu.eecs.entity.Major;
import com.cqjtu.eecs.entity.TrainingProject;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.math.BigDecimal;

@Data
@ToString
@EqualsAndHashCode
public class MajorBriefDTO {
    @ApiModelProperty(value = "专业简介")
    private String majorBrief;

    @ApiModelProperty(value = "版本编号")
    private String versionCode;

    @ApiModelProperty(value = "版本名称")
    private String versionName;

    @ApiModelProperty(value = "毕业学分")
    private BigDecimal graduateCredit;

    @ApiModelProperty(value = "基本学制")
    private Integer basicYear;

    public MajorBriefDTO() {
    }
    public MajorBriefDTO(Major major, TrainingProject trainingProject) {
        this.majorBrief = major.getMajorBrief();
        this.versionCode = trainingProject.getVersionCode();
        this.versionName = trainingProject.getVersionName();
        this.graduateCredit = trainingProject.getGraduateCredit();
        this.basicYear = trainingProject.getBasicYear();
    }
}
